#pragma once
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<stdlib.h>
#define FLUSH_NOW 1
#define FLUSH_LINE 2
#define FLUSH_ALL 4
#define SIZE 1024
typedef struct MyFile
{
    unsigned int fileno;
    int flags;
    //缓冲区
    char Cache[SIZE];
    int cap;
    int pos;
}MyFile;

MyFile* my_fopen(const char* path,const char* fg);
void My_Flussh(MyFile* fp);
void MyFwrite(MyFile* fp,const char* buf,int len);
void My_fclose(MyFile* fp);
